import { PartialType } from '@nestjs/mapped-types'
import { IsNotEmpty, IsOptional } from 'class-validator'
import { Address } from '../entities/address.entity'

export class CreateAddressDto extends PartialType(Address) {
  @IsNotEmpty({ message: '收件人不能为空' })
  recipient: string

  @IsNotEmpty({ message: '联系方式不能为空' })
  contact: string

  @IsNotEmpty({ message: '详细地址不能为空' })
  address: string

  @IsOptional()
  remark?: string
}
